<template>
	<view>
		<!-- 顶部的底图色块 -->
		<view class="bottomRect" :style="{marginTop:navHeight*2 + 'rpx'}" v-if="type == 'login'">
		</view>
		<!-- 顶部的底图色块 -->
		<view class="bottomRect" v-else-if="type == 'normal'">
		</view>
	</view>
</template>

<script>
	const app = getApp()

	export default {
		name: "bottomRect",
		props: {
			type: {
				type: String,
				default: 'normal'
			}
		},
		data() {
			return {
				// 导航的总高度
				navHeight: 0,
			};
		},
		mounted() {
			// 获取导航高度
			this.navHeight = app.globalData.navHeight
		}
	}
</script>

<style scoped lang="scss">
	.bottomRect {
		width: 100vw;
		height: 160rpx;
		background-color: #d3b8a7;
	}
</style>
